package org.jeecg.modules.nurse_user_orders.service;

import org.jeecg.common.base.BaseMap;
import org.jeecg.modules.nurse_user_orders.entity.NurseUserOrdersDetail;
import org.jeecg.modules.nurse_user_orders.entity.NurseUserOrdersComment;
import org.jeecg.modules.nurse_user_orders.entity.NurseUserOrdersPre;
import org.jeecg.modules.nurse_user_orders.entity.NurseUserOrders;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.nurse_user_orders.vo.NurseUserOrdersVo;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Description: 用户订单
 * @Author: jeecg-boot
 * @Date: 2024-06-04
 * @Version: V1.0
 */
public interface INurseUserOrdersService extends IService<NurseUserOrders> {

    /**
     * 删除一对多
     *
     * @param id
     */
    public void delMain(String id);

    /**
     * 批量删除一对多
     *
     * @param idList
     */
    public void delBatchMain(Collection<? extends Serializable> idList);

    BaseMap addByWeChat(NurseUserOrdersVo nurseUserOrdersVo,String mchId) throws Exception;

    List<NurseUserOrders> checkOrderStatus(String orderId);

    List<Map<String, Object>> listByWeChat(String beginDate, String endDate, String nurseType, String userId, String status);

    void closeByWeChat(String outTradeNo);

    NurseUserOrders successPay(NurseUserOrders nurseUserOrder);

    BaseMap payByWeChat(String outTradeNo);

    BaseMap refund(String outTradeNo);

    void payNotify(HttpServletRequest request,String mchid);

    BaseMap refundNotify(HttpServletRequest request,String mchid);

    public List<NurseUserOrders> checkOrderStatus1(String orderId);

    /**
     * 发送订单消息通知
     * @param orgCode 组织代码
     * @param orderText 订单摘要
     */
    void sendOrderNotification(String orgCode, String orderText);
}
